from django.urls import path
from .views import *
urlpatterns = [
    path('login',login),
    path('userinfo',UserInfo.as_view()),
    path('routes',routes),
    # path('getrole',getrole)

    path('menus', MenuView.as_view({'get': 'list', 'post': 'create'}),),
    path('menus/<int:pk>', MenuView.as_view({'get': 'retrieve', 'put': 'edit', 'delete': 'destroy'})),

    path('roles', RoleView.as_view({'get': 'list', 'post': 'create'})),
    path('roles/<int:pk>', RoleView.as_view({'get': 'retrieve', 'put': 'edit', 'delete': 'destroy'})),

    path('users', UserView.as_view({'get': 'list', 'post': 'create'})),
    path('users/<int:pk>',UserView.as_view({'get': 'retrieve', 'put': 'edit', 'delete': 'destroy'})),
]



